#pragma once

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "DX11Includes.h"

// Returns random float in [0, 1).
inline float RandF()
{
    return (float)(rand()) / (float)RAND_MAX;
}

// Returns random float in [a, b).
inline float RandF(float a, float b)
{
    return a + RandF()*(b-a);
}

// Returns random vector on the unit sphere.
inline XMVECTOR RandUnitVec3()
{
	XMVECTOR v = XMVectorSet(RandF(-1.0f, 1.0f),
                  RandF(-1.0f, 1.0f),
                  RandF(-1.0f, 1.0f),
				  0);
	return XMVector3Normalize(v);    
}


